﻿@namespace AntDesign.Pro.Pages
@layout UserLayout
@page "/user/register"

<div class="register-container">
    <h3>注册</h3>
    <Form Model="@_user">
        <FormItem>
            <Input Placeholder="用户名" @bind-Value="@context.UserName" Size="@InputSize.Large"></Input>
        </FormItem>

        <FormItem>
            <Input Placeholder="密码" @bind-Value="@context.Password" Size="@InputSize.Large" Type="password"></Input>
        </FormItem>

        <FormItem>
            <Input Placeholder="确认密码" @bind-Value="@context.ConfirmPassword" Size="@InputSize.Large" Type="password"></Input>
        </FormItem>
        
        <FormItem>
            <InputGroup Compact Size="@InputSize.Large" Style="display: table">
                <Select DefaultValue=@("+86") Style="width: 25%" Size="large">
                    <SelectOption Value="+86">+86</SelectOption>
                    <SelectOption Value="+87">+87</SelectOption>
                </Select>
                <Input Placeholder="手机号码" Style="width: 75%;" @bind-Value="@context.Phone"></Input>
            </InputGroup>
        </FormItem>
        
        <FormItem>
            <FormItem>
                <Row Gutter="8">
                    <Col Span="16">
                        <Input Placeholder="验证码" @bind-Value="@context.Captcha" Size="@InputSize.Large"></Input>
                    </Col>
                    <Col Span="8">
                        <Button Size="large" Block>发送验证码</Button>
                    </Col>
                </Row>
            </FormItem>
        </FormItem>
        
        <FormItem>
            <Button Type="primary" Size="large" OnClick="Reg" class="submit">注册</Button>
            <a class="login" href="/user/login">使用已有账户登录</a>
        </FormItem>
    </Form>
</div>

